﻿using Com.JunCaiSoft.ConstructionCashFlow.Dao;
using Com.JunCaiSoft.ConstructionCashFlow.IDao;
using Com.JunCaiSoft.DBContext;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.ReportCenter
{
    public static class ReportCenterServiceCollectionExtension
    {
        public static IServiceCollection AddReportCenter(this IServiceCollection services)
        {

            //添加银行相关注入
            services.TryAddSingleton<IBankSettlementDao>(new BankSettlementDao(services.BuildServiceProvider().GetService<MSSQLDbContext>()));

            //添加银行相关注入
            services.TryAddSingleton<IProjectSettlementDao>(new ProjectSettlementDao(services.BuildServiceProvider().GetService<MSSQLDbContext>()));

            return services;
        }
    }
}
